class PersonToLocationRelation < ActiveRecord::Base
  belongs_to :person
  belongs_to :location
  validates :person_id, :uniqueness => {:scope => :location_id}

  def insert(person, location)
    self.person_id = person
    self.location_id = location
    self.save
  end

end
